import time

from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.service import Service as FirefoxService
# 自动下载对应的驱动
from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager

driver = webdriver.Firefox(service=FirefoxService(GeckoDriverManager().install()))
#最大化窗口
driver.maximize_window()
driver.get("https://www.bilibili.com/")
#
# driver.find_element(By.CLASS_NAME,'nav-search-input').send_keys("selenium")

for ele in driver.find_elements(By.CLASS_NAME,'channel-link'):
    print(ele.text())
    print(type(ele))
time.sleep(10)